import request from '@/utils/request.js'

// 常量
const api_name = '/cart/h5/cartItem'

export default {
    getTotalCount() {
        return request({
            url: `${api_name}/getTotalCount`,
            method: 'get'
        })
    },
    addCartItem(data) {
        return request({
            url: `${api_name}/addCartItem`,
            method: 'post',
            data: data
        })
    },
    getCartItemList() {
        return request({
            url: `${api_name}/getCartItemList`,
            method: 'get'
        })
    },
    getTotalAmountByIds(data) {
        return request({
            url: `${api_name}/getTotalAmountByIds`,
            method: 'post',
            data: data
        })
    },
    batchDeleteByIds(data) {
        return request({
            url: `${api_name}/batchDeleteByIds`,
            method: 'post',
            data: data
        })
    },
    updateQuantityById(params) {
        return request({
            url: `${api_name}/updateQuantityById`,
            method: 'post',
            params: params
        })
    }
}

